<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <style>
        .container{
            width: 300px;
            height: 600px;
            background-color: white;
            border-radius: 5px;
            padding: 5px 15px;
        }

        .header {
            border-bottom: 1px solid #ccc;
        }

        body{
            background-color: #ccc;
        }

    </style>
</head>
<body>
    <div id='app'>
        <card>
            <div style="color:red">登录</div>
         </card>
    </div>


    <template  id="cardTemp">
        <div class="container">
            <div class="header">
                <slot></slot>
            </div>
            <div class="body">
                内容。。。
            </div>
        </div>
    </template>
    <script>
        const card={
            template:'#cardTemp'
        }
    const vm = new Vue({
        el: '#app',
        data: {
        },
        components: {
            card:{
                template:'#cardTemp',
            }
           
                
            }
    })
    </script>
</body>
</html>